package com.xtxk.service.seed;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.xtxk.common.constant.CommonConstant;

@Service
public class DirectSeedService {
	
	/**
	 * 开启直播
	 * @return
	 */
	public Map<String, Object> startPlay(){
		Map<String, Object> map = new HashMap<>();
		if (CommonConstant.status) {
			map.put("resourceID", "D000000000000032");
			map.put("resourceCH", 0);
			map.put("screenIndex", 0);
			return map;
		}
		return map;
	}
	
	/**
	 * 直播操作反馈
	 * @return
	 */
	public Map<String, Object> onStartPlayEvent(){
		Map<String, Object> map = new HashMap<>();
		if (CommonConstant.status) {
			map.put("resourceID", "D000000000000032");
			map.put("resourceCH", 0);
			map.put("screenIndex", 0);
			map.put("videoRTPID", "1100");
			map.put("audioRTPID", "1101");
			map.put("code", 1);
			return map;
		}
		return map;
	}
	
	/**
	 * 停止直播请求
	 * @return
	 */
	public Map<String, Object> stopPlay(){
		Map<String, Object> map = new HashMap<>();
		if (CommonConstant.status) {
			map.put("serverIP", "192.16.1.85");
			map.put("serverPort", 5060);
			map.put("sipusername", "SIPDECODER000031");
			map.put("sippassword", "123456");
			return map;
		}
		return map;
	}
	
	/**
	 * 停播操作反馈
	 * @return
	 */
	public Map<String, Object> onStopLayEvent(){
		Map<String, Object> map = new HashMap<>();
		if (CommonConstant.status) {
			map.put("resourceID", "D000000000000032");
			map.put("resourceCH", 0);
			return map;
		}
		return map;
	}

}
